package com.bawei.movie.repos

import com.bawei.http.ApiBaseResponse
import com.bawei.movie.api.MovieApiServer
import com.bawei.common.entity.MovieEntity
import com.bawei.movie.entity.MovieTabEntity
import javax.inject.Inject

class MovieRepository @Inject constructor(private val apiServer: MovieApiServer) {

    suspend fun getMovieTabs(): ApiBaseResponse<List<MovieTabEntity>>{
        return apiServer.getMultiType()
    }

    suspend fun getMultiTypeByPid(pid: Int): ApiBaseResponse<List<MovieTabEntity>>{
        return apiServer.getMultiTypeByPid(pid)
    }

    suspend fun getMultiVideoList(typeId: Int, page:Int, pageSize: Int): ApiBaseResponse<List<MovieEntity>>{
        return apiServer.getMultiVideoByTypeId(typeId, page, pageSize)
    }

    suspend fun getRecommendMultiVideo(page:Int, pageSize: Int): ApiBaseResponse<List<MovieEntity>>{
        return apiServer.getRecommendMultiVideo(page, pageSize)
    }



}